package cn.aylog.controller;

import cn.aylog.po.User;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.Response;

@RestController
public class SomeController {

    @RequestMapping("/some")
    public String someHandle() {
        return "Hello";
    }

    @RequestMapping("user")
    public Object userHandle(HttpServletResponse response) {
        User o = new User("aylog", 18);
        return JSONObject.toJSONString(o);
    }

}
